package com.th.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @author ThreePure
 * @date 20/12/20 11:10
 * @description: TODO
 * @since 1.8
 */

/**组件，放在类上。相当于：就是一个bean */
@Component
@Scope("prototype")
public class User {
    //相当于：<property name="name" value="TH"/>   也可以放在setter方法前
    //@Value("TH")
    public String name;

    @Value("sanchun")
    public void setName(String name) {
        this.name = name;
    }

}
